package com.ming.mallchat.common.user.service;

import com.ming.mallchat.common.common.domain.vo.req.CursorPageBaseReq;
import com.ming.mallchat.common.common.domain.vo.req.PageBaseReq;
import com.ming.mallchat.common.common.domain.vo.resp.CursorPageBaseResp;
import com.ming.mallchat.common.common.domain.vo.resp.PageBaseResp;
import com.ming.mallchat.common.user.domain.vo.req.friend.FriendApplyReq;
import com.ming.mallchat.common.user.domain.vo.req.friend.FriendApproveReq;
import com.ming.mallchat.common.user.domain.vo.req.friend.FriendCheckReq;
import com.ming.mallchat.common.user.domain.vo.resp.friend.ChatMemberResp;
import com.ming.mallchat.common.user.domain.vo.resp.friend.FriendApplyResp;
import com.ming.mallchat.common.user.domain.vo.resp.friend.FriendCheckResp;
import com.ming.mallchat.common.user.domain.vo.resp.friend.FriendUnreadResp;
import com.ming.mallchat.common.user.pojo.UserFriend;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author 86150
* @description 针对表【user_friend(用户联系人表)】的数据库操作Service
* @createDate 2023-10-11 11:04:17
*/
public interface UserFriendService{

    /**
     * 用户联系人
     * @param uid 用户id
     * @param req 分页请求体
     * @return {@link CursorPageBaseResp}<{@link ChatMemberResp}>
     */
    CursorPageBaseResp<ChatMemberResp> friendList(Long uid, CursorPageBaseReq req);

    /**
     * 批量检查是否为自己好友
     * @param uid
     * @param req
     * @return {@link CursorPageBaseResp}<{@link ChatMemberResp}>
     */
    FriendCheckResp check(Long uid, FriendCheckReq req);

    /**
     * 好友申请
     * @param uid
     * @param request
     */
    void apply(Long uid, FriendApplyReq request);

    /**
     * 审批好友申请
     * @param uid
     * @param request
     */
    void applyApprove(Long uid, FriendApproveReq request);

    /**
     * 好友申请列表
     * @param uid
     * @param request
     * @return {@link PageBaseResp}<{@link FriendApplyResp}>
     */
    PageBaseResp<FriendApplyResp> pageApplyFriend(Long uid, PageBaseReq request);

    /**
     * 好友申请未读数
     * @param uid
     * @return {@link FriendUnreadResp}
     */
    FriendUnreadResp unread(Long uid);

    /**
     * 删除好友
     * @param uid
     * @param targetUid
     */
    void deleteFriend(Long uid, Long targetUid);
}
